<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>
        li{
            text-align: center ;
            font-size: 25px;
        }
    </style>
</head>
<body>
<div th:fragment="head" style="font-size: 20px;padding-top: 10px">
    <th:block  th:if="${#session.getAttribute('userName') != '空'}">
        <img  style="width: 30px;height: 30px;border-radius: 50%"
              th:src="@{'/images/'+${#session.getAttribute('photo')}}">
    </th:block>
    <th:block  th:if="${#session.getAttribute('userName') != '空'}">
        <span th:text="${#session.getAttribute('userName')}"></span>
    </th:block>
    <a th:href="@{/}">文章管理系统</a>
    <th:block th:if="${#session.getAttribute('userName') == '空'}">
        <a th:href="@{/tologin}">登录</a>
    </th:block>
    <th:block th:if="${#session.getAttribute('userName') != '空'}">
        <a th:href="@{/logout}">注销</a>
    </th:block>
</div>
<div th:fragment="left" style="background-color: #f0f0f0">
    <ul style="height:80vh;width:100%;list-style-type: none;margin: 0;padding: 0;">
        <li >
            <a th:href="@{/back/index}">后台首页</a>
        </li>
        <li >
            <a th:href="@{/back/toEditArticle}">发布文章</a>
        </li>
        <li>
            <a th:href="@{/(contentSize = 6)}" >文章管理</a>
        </li>
        <li>
            <a th:href="@{/back/toPersonInfo}" >个人信息</a>
        </li>
    </ul>
</div>

</body>
</html>